package com.zhou.message.job;

import com.zhou.framework.common.SpringFactory;
import com.zhou.framework.quartz.job.JobTask;
import com.zhou.message.model.MessageSendModel;
import com.zhou.message.service.MessageService;
import com.zhou.org.common.EnumConstant;
import org.quartz.JobExecutionContext;

/**
 * 定时发送消息
 */
public class MessageSendTask extends JobTask {

    @Override
    public void run(JobExecutionContext jobContext) {
        MessageService messageService = SpringFactory.getBean(MessageService.class);

        MessageSendModel model = new MessageSendModel();
        //待发送
        model.setStatus(EnumConstant.MSG_SEND_STATUS_WAIT);
        //非定时消息
        model.setTimer(0);
        messageService.sendSynMessage(model);

    }
}
